package com.shy.springframework.beans.factory.config;

import com.shy.springframework.beans.BeansException;
import com.shy.springframework.beans.PropertyValues;

/**
 * @author yzpang
 * @desc: Bean实例化前执行
 * @date: 2023/2/10 16:30
 */
public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor{

    /**
     * bean实例化之前执行
     * @param beanClass
     * @param beanName
     * @return
     * @throws BeansException
     */
    Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) throws BeansException;


    /**
     * 属性注入前执行
     * @param pvs
     * @param bean
     * @param beanName
     * @return
     */
    PropertyValues postProcessPropertyValues(PropertyValues pvs, Object bean, String beanName);

}
